package com.rd.student.ruanjian.class4.zhouzihe.day0803;

public class Lady {
    String name;
    Animal pet;

    Lady(String name, Animal pet) {
        this.name = name;
        this.pet = pet;

    }

    public void myPetEnjoy() {
        System.out.println("养了一只" + pet.getName() + "," + "高兴时");
        pet.enjoy();


    }

    @Override
    public String toString() {
        return "Lady{" +
                "name='" + name + '\'' +
                ", pet=" + pet +
                '}';
    }
}
